Skip to content

Sync fork with latest WebGoat/WebGoat main - #45

Merged
fgibelin merged 4 commits into
mainfrom
fgibelin-sync-fork-387
Oct 13, 2026
Merged

fgibelin merged 4 commits into
mainfrom
fgibelin-sync-fork-387

Conversation

@fgibelin

Copy link
Copy Markdown
Owner

Summary

Merge upstream WebGoat/WebGoat main through e7b13136, preserving fork history.

Upstream commits:

No fork-specific code modifications. Merge only after all PR checks pass.

github-actions Bot and others added 4 commits October 12, 2026 21:29
New lesson on passkeys/security keys and the vulnerabilities that arise
from incomplete server-side verification of WebAuthn ceremonies:

- Registration assignment: GoatBank binds a new credential to the account
  named by a client-supplied (and predictable) user handle.
- Authentication assignment: GoatBank verifies the assertion signature but
  never compares the challenge, so a leaked login request can be replayed.
- Quiz on other pitfalls and a mitigation page.
- Bonus assignment: register and sign in with a real roaming security key
  via the browser WebAuthn API against a fully verifying implementation
  (packed / fido-u2f attestation, single-use challenges, signCount checks).

Includes a minimal CBOR codec and a virtual authenticator so the GoatBank
assignments work without hardware. Covered by unit, REST integration and
Playwright tests; the UI test uses a CDP virtual CTAP2/USB authenticator.
Desktop users need ZAP-launched Firefox to reach WebGoat through the proxy and use the supplied browser bookmarks.

Closes: WebGoat#2563
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2e38dbaf-314a-4291-956f-e15daa365aa0

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The secure flow contains HTML injection, non-atomic challenge consumption, and malformed attestation handling issues.

6 open findings
What changed in this PR

Synchronizes the fork with upstream through e7b13136, adding the A7 WebAuthn lesson, desktop ZAP proxy setup, and the next snapshot version.

Changes:

  • Adds WebAuthn lessons, assignments, documentation, and tests.
  • Configures Firefox and ZAP proxying in the desktop image.
  • Advances the project to 2026.6-SNAPSHOT.
File Description
pom.xml Advances snapshot version.
Dockerfile_desktop Installs and configures Firefox.
config/​desktop/​WebGoat.txt Documents proxied browser startup.
config/​desktop/​start_zap.sh Configures PAC and Firefox for ZAP.
config/​desktop/​firefox-policies.json Adds homepage and bookmarks policies.
src/​main/​java/​org/​owasp/​webgoat/​container/​WebSecurityConfig.java Permits anonymous PAC access.
src/​main/​java/​org/​owasp/​webgoat/​container/​ProxyAutoConfigController.java Serves the ZAP PAC file.
src/​main/​java/​org/​owasp/​webgoat/​lessons/​webauthn/​Cbor.java Implements minimal CBOR encoding and parsing.
src/​main/​java/​org/​owasp/​webgoat/​lessons/​webauthn/​GoatBankCeremonyEndpoints.java Provides simulated vulnerable ceremonies.
src/​main/​java/​org/​owasp/​webgoat/​lessons/​webauthn/​SecurityKeyCeremonyEndpoints.java Implements real-key registration options and verification.
src/​main/​java/​org/​owasp/​webgoat/​lessons/​webauthn/​VirtualAuthenticator.java Simulates a WebAuthn authenticator.
src/​main/​java/​org/​owasp/​webgoat/​lessons/​webauthn/​WebAuthn.java Registers the A7 lesson.
src/​main/​java/​org/​owasp/​webgoat/​lessons/​webauthn/​WebAuthnAuthenticationAssignment.java Adds the replay assignment.
src/​main/​java/​org/​owasp/​webgoat/​lessons/​webauthn/​WebAuthnLessonState.java Stores per-user credentials and fixtures.
src/​main/​java/​org/​owasp/​webgoat/​lessons/​webauthn/​WebAuthnQuiz.java Implements quiz evaluation.
src/​main/​java/​org/​owasp/​webgoat/​lessons/​webauthn/​WebAuthnRegistrationAssignment.java Adds the account-binding assignment.
src/​main/​java/​org/​owasp/​webgoat/​lessons/​webauthn/​WebAuthnSecurityKeyAssignment.java Verifies real-key assertions.
src/​main/​java/​org/​owasp/​webgoat/​lessons/​webauthn/​WebAuthnSupport.java Provides WebAuthn parsing and cryptography.
src/​main/​resources/​lessons/​webauthn/​css/​webauthn.css Styles the lesson interface.
src/​main/​resources/​lessons/​webauthn/​html/​WebAuthn.html Defines lesson pages and forms.
src/​main/​resources/​lessons/​webauthn/​i18n/​WebGoatLabels.properties Adds feedback and hints.
src/​main/​resources/​lessons/​webauthn/​js/​webauthn.js Drives browser ceremony flows.
src/​main/​resources/​lessons/​webauthn/​js/​questions_webauthn.json Defines quiz questions.
src/​main/​resources/​lessons/​webauthn/​documentation/​WebAuthn_intro.adoc Introduces WebAuthn.
src/​main/​resources/​lessons/​webauthn/​documentation/​WebAuthn_concepts.adoc Explains core concepts.
src/​main/​resources/​lessons/​webauthn/​documentation/​WebAuthn_registration.adoc Documents registration.
src/​main/​resources/​lessons/​webauthn/​documentation/​WebAuthn_registration_assignment.adoc Explains the registration exercise.
src/​main/​resources/​lessons/​webauthn/​documentation/​WebAuthn_authentication.adoc Documents authentication.
src/​main/​resources/​lessons/​webauthn/​documentation/​WebAuthn_authentication_assignment.adoc Explains the replay exercise.
src/​main/​resources/​lessons/​webauthn/​documentation/​WebAuthn_pitfalls.adoc Describes implementation pitfalls.
src/​main/​resources/​lessons/​webauthn/​documentation/​WebAuthn_quiz.adoc Introduces the quiz.
src/​main/​resources/​lessons/​webauthn/​documentation/​WebAuthn_mitigation.adoc Documents secure implementation guidance.
src/​main/​resources/​lessons/​webauthn/​documentation/​WebAuthn_securitykey.adoc Explains the real-key bonus.
src/​test/​java/​org/​owasp/​webgoat/​lessons/​webauthn/​CborTest.java Tests CBOR and basic attestation parsing.
src/​test/​java/​org/​owasp/​webgoat/​lessons/​webauthn/​WebAuthnLessonTest.java Tests assignment behavior.
src/​it/​java/​org/​owasp/​webgoat/​integration/​WebAuthnIntegrationTest.java Exercises the complete REST lesson flow.
src/​it/​java/​org/​owasp/​webgoat/​integration/​LabelAndHintIntegrationTest.java Includes WebAuthn hint validation.
src/​it/​java/​org/​owasp/​webgoat/​playwright/​webgoat/​lessons/​WebAuthnLessonUITest.java Tests lesson UI workflows.
src/​it/​java/​org/​owasp/​webgoat/​playwright/​webgoat/​pages/​lessons/​WebAuthnLessonPage.java Adds WebAuthn page interactions.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +142 to +145
public Map<String, Object> capturedLoginOfJerry(RelyingParty rp) {
return capturedLogins.computeIfAbsent(
rp.origin(),
origin -> {
Comment on lines +119 to +120
.formatted(stored.credentialId(), stored.aaguid(), stored.attestation(),
authData.flagsDescription())
Comment on lines +97 to +98
String expectedChallenge = (String) session.getAttribute(REGISTRATION_CHALLENGE);
session.removeAttribute(REGISTRATION_CHALLENGE);
Comment on lines +58 to +59
String expectedChallenge = (String) session.getAttribute(AUTHENTICATION_CHALLENGE);
session.removeAttribute(AUTHENTICATION_CHALLENGE);
Comment on lines +380 to +384
byte[] aaguidExtension = certificate.getExtensionValue(AAGUID_EXTENSION_OID);
if (aaguidExtension != null
&& !Arrays.equals(
Arrays.copyOfRange(aaguidExtension, aaguidExtension.length - 16, aaguidExtension.length),
authData.aaguid())) {
Comment on lines +357 to +358
case "packed" -> verifyPacked(attStmt, authData, signedData);
case "fido-u2f" -> verifyFidoU2f(attStmt, authData, clientDataHash);
@fgibelin
fgibelin merged commit a41b044 into main Oct 13, 2026
10 checks passed
@fgibelin
fgibelin deleted the fgibelin-sync-fork-387 branch October 13, 2026 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants